package com.changfeng.common;

import com.changfeng.auth.dto.UserAuth;

public class CurrentUser {
    private static final ThreadLocal<UserAuth> threadLocal = new ThreadLocal<>();

    public static void saveUserId(UserAuth user) {
        threadLocal.set(user);
    }

    public static UserAuth getCurrentUser() {
        return threadLocal.get();
    }
}
